<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>

<h2><bean:write name="document" property="title"/></h2>

<table>
	<tr>
		<td><bean:message  bundle="content" key="list.table.coltitle" />:</td>
		<td><strong><bean:write name="document" property="title"/></strong></td>
	</tr>
	<tr>
		<td><bean:message  bundle="content" key="list.table.coldesc" />:</td>
		<td><strong><bean:write name="document" property="description"/></strong></td>
	</tr>
	<tr>
		<td><bean:message  bundle="content" key="list.table.colsize" />:</td>
		<td><strong><bean:write name="document" property="sizeFormated" /> bytes</strong></td>
	</tr>
	<tr>
		<td><bean:message  bundle="content" key="list.table.coluploaddate" />:</td>
		<td><strong><bean:write name="document" property="uploadedAt"  bundle="format" formatKey="format.date.short"/></strong></td>
	</tr>
	<tr>
		<td><bean:message  bundle="content" key="list.table.coluser" /></td>
		<td><strong><c:out value="${document.user.name}" /></strong></td>
	</tr>
	<tr  style="text-align : center;" >
		<td colspan="2">
			<c:url var="urlBack" scope="request" value="/document/list.do">
	            <c:param name="id" value="${document.id}"/>
	            <c:param name="dispatch" value="list"/>
	        </c:url>
	     	<c:url var="urlDel" scope="request" value="/document/delete.do">
	            <c:param name="id" value="${document.id}"/>
	            <c:param name="dispatch" value="delete"/>
	        </c:url>
	     	<c:url var="urlEdit" scope="request" value="/document/edit.do">
	            <c:param name="id" value="${document.id}"/>
	            <c:param name="dispatch" value="edit"/>
	        </c:url>  
	         &lt;&lt; 
	        <a href="<c:out value="${urlBack}" />"><bean:message  bundle="content" key="detail.actions.backtolist"/></a>
	        |<a href="<c:out value="${urlDel}" />"><bean:message  bundle="content" key="detail.actions.delete" /></a>|
	        <a href="<c:out value="${urlEdit}" />"><bean:message  bundle="content" key="detail.actions.edit" /></a> 
	        &gt;&gt;
	   </td>
	</tr>				
</table>